<%@page contentType="text/html;charset=UTF-8" session="false" %>
<%@include  file="/WEB-INF/jspf/import.jspf"%>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" id="pagerForm" name="searchForm" method="post">
        <input type="hidden" name="pageNum" value="${pager.pageNo}" />
        <input type="hidden" name="pageSize" value="${pager.pageSize}" />
        <input type="hidden" name="orderField" value="${orderField}" />
        <input type="hidden" name="orderDirection" value="${orderDirection}" />
        <div class="searchBar">
            <table class="searchContent">
                <tbody>
                    <tr>
                        <td><label>消息ID：</label><input type="text" name="msgId" value="${msgId}" class="textInput"></td>
                        <td><label>状态：</label>
	                        <select  name="status">
	                           <option value="99" <c:if test="${99==status}">selected</c:if>>请选择</option>
	                           <option value="0" <c:if test="${0==status}">selected</c:if>>未发送</option>
	                           <option value="-1" <c:if test="${-1==status}">selected</c:if>>发送失败</option>
	                           <option value="1" <c:if test="${1==status}">selected</c:if>>已发送</option>
	                        </select>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <table class="table" style="width: 100%" layoutH="110">
        <thead>
            <tr>
                <th width="5%" orderField="message_detail_id" class="${orderField=='message_detail_id' ? orderDirection : ''}">Id</th>
                <th width="5%" orderField="message_id" class="${orderField=='message_id' ? orderDirection : ''}">消息Id</th>
                <th width="5%" orderField="user_id" class="${orderField=='user_id' ? orderDirection : ''}">用户ID</th>
                <th width="20%">用户昵称</th>
                <th width="7%" orderField="create_at" class="${orderField=='create_at' ? orderDirection : ''}">创建时间</th>
                <th width="7%" orderField="send_at" class="${orderField=='send_at' ? orderDirection : ''}">发送时间</th>
                <th width="8%" orderField="status" class="${orderField=='status' ? orderDirection : ''}">状态</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach var="item" items="${pager.resultList}">
                <tr>
                    <td>${item.messageDetailId}</td>
                    <td>${item.messageId}</td>
                    <td>${item.uid}</td>
                    <td>${item.userName}</td>
                    <td><fmt:formatDate value="${item.createAt}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    <td><fmt:formatDate value="${item.sendAt}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    <td>
                      <c:if test="${item.status==0 }">未发送</c:if>
                      <c:if test="${item.status==1 }">已发送</c:if>
                    </td>
                </tr>
            </c:forEach>
        </tbody>
    </table>
</div>
<div class="panelBar">
    <div class="pages">
        <span>共 ${pager.total} 条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.pageSize}" pageNumShown="10" currentPage="${pager.pageNo}"></div>
</div>

